import tensorflow as tf

a = tf.random_normal([3, 3], stddev=0.1)
dataset = tf.data.Dataset.from_tensor_slices(a)
iterator = dataset.make_initializable_iterator()
next_item = iterator.get_next()

with tf.Session() as sess:
    sess.run(iterator.initializer)
    while True:
        try:
            print(sess.run(next_item))
        except tf.errors.OutOfRangeError:
            break
